home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 - Homepage / CHIP.BIN / share / htmledit / bashhtml / bashhtml.exe / %AppDir% / scripts / Print Current Page.txt < prev    next >
Encoding:
Text File  |  2003-09-01  |  1013 b   |  32 lines

  1. [DESCRIPTION]Randomly displays content, such as ads or links.[/DESCRIPTION]
  2.  
  3. [HEAD CODE]<Script Language ="JavaScript">
  4. <!--
  5.  
  6. function RandomContent() 
  7. {
  8.   var x = Math.round(Math.random()*4);
  9.  
  10.   if (x == 0) 
  11. {document.write("<A HREF='http://www.bashsoftware.tk'>Bash Software</a>"); return; 
  12. }
  13.   if (x == 1) 
  14. {document.write("<A HREF='http://www.kickass.at/vanillaice'>Vanilla Ice</a>"); return; 
  15. }
  16.   if (x == 2) 
  17. {document.write("<A HREF='http://www.wcwarchive.tk'>WCW Archive</a>"); return; 
  18. }
  19.   if (x == 3) 
  20. {document.write("<A HREF='http://www.dynamicdrive.com'>Dynamic Drive</a>"); return; 
  21. }
  22.   if (x == 4) 
  23. {document.write("<A HREF='http://www.allmusic.com'>AllMusic</a>"); return; 
  24. }
  25. }
  26.  
  27. -->
  28. </SCRIPT>[/HEAD CODE]
  29.  
  30. [BODY CODE]<Script Language ="JavaScript">RandomContent();</Script>[/BODY CODE]
  31.  
  32. [NOTES]Place the Body code wherever you want the content to be displayed on your page. Also, you can change the number at the end of the "var x" line, to add more content.[/NOTES]